package com.thh.shirodemo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @author shkstart
 * @create 2022-07-17-23:55
 */
@Data
@ToString
@AllArgsConstructor
public class User {
    @TableId(value="user_id",type= IdType.AUTO)
    private Integer userId;
    private String userName;
    private String userPass;
    private Integer  userRoles;
    @TableField(exist = false)
    private List<String> userPerms;//角色资源

    public User() {
    }

    public void setUserPerms(List<String> userPerms) {
        this.userPerms = userPerms;
    }

    public User(String userName, String userPass, Integer userRoles, List<String> userPerms) {
        this.userName = userName;
        this.userPass = userPass;
        this.userRoles = userRoles;
        this.userPerms = userPerms;
    }
}
